<?php
$this->breadcrumbs=array(
	Yii::t('back', 'Settings'),
);?>

<h1><?php echo Yii::t('back', 'Manage Settings') ?></h1>

<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'setting-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note"><?php echo Yii::t('back',
				'Fields with {asterisk} are required.',
				array('{asterisk}'=>'<span class="required">*</span>'));
	?></p>

	<div class="row">
		<?php echo $form->labelEx($model, 'indexPageId'); ?>
        <?php echo $form->dropDownList($model, 'indexPageId',
			CHtml::listData(Page::model()->findAll(), 'id', 'name'));
		?>
		<?php echo $form->error($model, 'indexPageId'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'defaultLayoutId'); ?>
        <?php echo $form->dropDownList($model, 'defaultLayoutId',
			CHtml::listData(Layout::model()->findAll(), 'id', 'name'));
		?>
		<?php echo $form->error($model, 'defaultLayoutId'); ?>
	</div>
	
	<?php /*foreach($model->safeAttributeNames as $attributeName){ ?>
		<div class="row">
			<?php echo $form->labelEx($model, $attributeName); ?>
			<?php echo $form->textField($model, $attributeName); ?>
			<?php echo $form->error($model, $attributeName); ?>
		</div>
	<?php } */?>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Save'); ?>
	</div>

<?php $this->endWidget(); ?>
</div><!-- form -->